package com.platform.usercenter.mapper;

import java.util.List;

import com.platform.common.core.domain.base.BaseRequest;
import com.platform.usercenter.domain.SysOrganization;
import com.platform.usercenter.domain.vo.SysOrganizationVO;
import org.apache.ibatis.annotations.Param;

/**
 * 组织Mapper接口
 *
 * @author platform
 * @date 2024-10-24
 */
public interface SysOrganizationMapper
{
    /**
     * 查询组织
     *
     * @param orgId 组织主键
     * @return 组织
     */
    public SysOrganization selectSysOrganizationByOrgId(Long orgId);

    /**
     * 查询组织列表
     *
     * @param sysOrganization 组织
     * @return 组织集合
     */
    public List<SysOrganization> selectSysOrganizationList(SysOrganization sysOrganization);
    public List<SysOrganization> selectSysOrganizationListCheck(SysOrganization sysOrganization);
    public List<SysOrganizationVO> listTree(SysOrganization sysOrganization);
    public List<SysOrganizationVO> listTreeByUserId(@Param(value = "userId") Long userId);

    /**
     * 新增组织
     *
     * @param sysOrganization 组织
     * @return 结果
     */
    public int insertSysOrganization(SysOrganization sysOrganization);

    /**
     * 修改组织
     *
     * @param sysOrganization 组织
     * @return 结果
     */
    public int updateSysOrganization(SysOrganization sysOrganization);

    /**
     * 删除组织
     *
     * @param orgId 组织主键
     * @return 结果
     */
    public int deleteSysOrganizationByOrgId(Long orgId);

    /**
     * 批量删除组织
     *
     * @param orgIds 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteSysOrganizationByOrgIds(Long[] orgIds);

    /**
     * 查询组织列表
     *
     * @param sysOrganization 组织
     * @return 组织集合
     */
    public List<SysOrganizationVO> selectSysOrganizationTree(SysOrganization sysOrganization);

    public List<SysOrganizationVO> userAllOrgTree(Long userId);


    List<SysOrganization> selectSysOrganizationListByUserId(Long userId);

    List<SysOrganizationVO> listApprovalOrg(SysOrganization organization);

    List<SysOrganizationVO> listApprovalOrgByIds(SysOrganization organization);

	List< String> getAirportListByOrgAndUser( BaseRequest res );
}
